package sctu.edu.java.year2016.team05.zengkun.day20160615.UserPackge.KnowledgBase;

import sctu.edu.java.year2016.team05.zengkun.day20160615.UserPackge.SearchPackge.Allquestion;

import java.io.*;
import java.util.Scanner;

/**
 * Created by mike on 2016/6/25.
 */
public class Surface {

    public static void run()

    {
        System.out.println("\t欢迎进入运维平台：\n 若您是客户  请输入“客户”，维修人员 请输入“维修人员”");
        MainBorad.choose();
            }


    public static void question0(){

        System.out.println("目前用户所不能解决的方案\n输入此问题的答案");
        try {
            BufferedReader bf= new BufferedReader(new FileReader("D:/myproblem/work.txt"));
            String line = null;
            try {
                while ((line = bf.readLine()) != null) {

    //将文本打印到控制台
                    System.out.println(line);
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        String fileName="D:/myproblem/work.txt";
        try {

            FileWriter writer = new FileWriter(fileName, true);
            Scanner scanner=new Scanner(System.in);
            String content = scanner.nextLine();
            writer.write(content);
            writer.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
        System.out.println("\n\n\n输入exit返回上一级");
        Allquestion.return0();
    }
    public  static void see(){
        System.out.println("工作人员已回复问题：");
        BufferedReader bf= null;
        try {
            bf = new BufferedReader(new FileReader("D:/myproblem/work.txt"));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        String line = null;
        try {
            while ((line = bf.readLine()) != null)
                System.out.println(line);
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
    }


